// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   InicioAction.java

package org.fiel.struts.actions;

import java.io.PrintStream;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.*;
import org.fiel.commons.jdbc.Persistor;
import org.fiel.helpers.Enums;
import org.fiel.persistence.ResumenPersistor;

// Referenced classes of package org.fiel.struts.actions:
//            ListaSubtiposAction, FielAction

public class InicioAction extends ListaSubtiposAction
{

    public InicioAction()
    {
    }

    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
        throws Exception
    {
        try
        {
            String rol = obtenerRol(request);
            java.util.List subtipos = ObtenerSubtipos(Enums.TIPO_VIDEOS);
            java.util.List informacion = ObtenerInformacionSubtipos(subtipos, rol);
            request.setAttribute("videos", informacion);
            ResumenPersistor persistor = new ResumenPersistor();
            java.util.List resumen = persistor.FindAll(null);
            request.setAttribute("resumen", resumen);
            return mapping.findForward("success");
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
        return mapping.findForward("failed");
    }
}
